﻿// -------------------------------------------------------------------------------------------------------------------------------
// <copyright file="IMatrixFactorRingOperationsProvider{T}.cs" company="Exul">
//     Copyright (c) Exul. All rights reserved.
// </copyright>
// <author>
//     Exul
// </author>
// -------------------------------------------------------------------------------------------------------------------------------

namespace ExulLibrary.Mathematics.LinearAlgebra
{
    #region Usings

    using System;

    #endregion

    /// <summary>
    ///     Provides operations for matrix and factor like addition/multiplication of matrix with/by factor.
    /// </summary>
    /// <typeparam name="T">
    ///     The type of values of matrix elements.
    /// </typeparam>
    public interface IMatrixFactorRingOperationsProvider<T>
    {
        #region Methods

        #region public

        /// <summary>
        ///     Adds the specified factor to all elements of the matrix.
        /// </summary>
        /// <param name="matrix">
        ///     The matrix whose elements should be added.
        /// </param>
        /// <param name="factor">
        ///     The factor to add.
        /// </param>
        /// <exception cref="ArgumentNullException">
        ///     <paramref name="matrix"/> is <see langword="null"/>.
        /// </exception>
        void Add(Matrix<T> matrix, T factor);

        /// <summary>
        ///     Multiplies all elements of the matrix by the specified factor.
        /// </summary>
        /// <param name="matrix">
        ///     The matrix whose elements should be multiplied.
        /// </param>
        /// <param name="factor">
        ///     The factor to multiply.
        /// </param>
        /// <exception cref="ArgumentNullException">
        ///     <paramref name="matrix"/> is <see langword="null"/>.
        /// </exception>
        void Multiply(Matrix<T> matrix, T factor);

        #endregion

        #endregion
    }
}